package com.freemyleft.left.left_app.mian.index;

import android.annotation.SuppressLint;
import android.graphics.Color;

import com.freemyleft.left.left_app.mian.index.message.MessageDelegate;
import com.freemyleft.left.left_app.mian.index.my.MyDelegate;
import com.freemyleft.left.left_app.mian.index.work.WorkDelegate;
import com.freemyleft.left.zapp.delegates.Bottom.BaseBottomDelegate;
import com.freemyleft.left.zapp.delegates.Bottom.BottomItemDelegate;
import com.freemyleft.left.zapp.delegates.Bottom.BottomTabBean;
import com.freemyleft.left.zapp.delegates.Bottom.ItemBuilder;

import java.util.LinkedHashMap;

/**
 * Created by FreeMyleft on 2017/12/30.
 */

@SuppressLint("ValidFragment")
public class BottomDelegate extends BaseBottomDelegate {
    int index=0;
    public BottomDelegate(int index) {

        this.index = index;
    }
    @Override
    public LinkedHashMap<BottomTabBean, BottomItemDelegate> setItems(ItemBuilder builder) {
        final LinkedHashMap<BottomTabBean, BottomItemDelegate> items = new LinkedHashMap<>();
        items.put(new BottomTabBean("{icon-work}", "工作"), new WorkDelegate());
        items.put(new BottomTabBean("{icon-message}", "消息"), new MessageDelegate());
        items.put(new BottomTabBean("{icon-my}", "我的"), new MyDelegate());
        return builder.addItems(items).builder();
    }
    //进去显示那个页面
    @Override
    public int setIndexDelegate() {
        return index;
    }

    @Override
    public int setClickedColor() {
        return Color.parseColor("#1296db");
    }

    }



